//
//  common.m
//  yuanhuaPlane
//
//  Created by zhuyuanbin on 6/23/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "common.h"


@implementation common


-(id)init
{
	if(self = [super init])
	{
		
	}
	return self;
}


+(CGFloat)widthOfString:(NSString*)str stringFont:(CGFloat)font
{
	CGFloat widthofstring = str.length*font;
	return widthofstring;
}


+(UIImage*)createImage:(CGFloat) width Height:(CGFloat)height Image:(UIImage*)image
{
	CGRect rect = CGRectMake(0.0, 0.0,width, height);
	UIGraphicsBeginImageContext(rect.size);
	[image drawInRect:rect];
	image = UIGraphicsGetImageFromCurrentImageContext();
	UIGraphicsEndImageContext();
	return image;
	
}
@end
